package com.sixth.statistics.controller;

import com.sixth.core.entity.Registration;
import com.sixth.core.vo.R;
import com.sixth.statistics.service.RegistrationService;
import com.sixth.statistics.vo.RegistrationVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @program: six-hospital-system
 * @description: 医生工作量统计控制器
 * @author: 朱永奇
 * @create: 2024-08-20 08:56
 **/
@Api(tags = "医生工作量统计")
@RestController
@RequestMapping("/statistics/registration")
public class RegistrationController {

    @Autowired
    private RegistrationService registrationService;

    @ApiOperation(value = "医生工作量统计", notes = "根据传入的 RegistrationVo 对象获取医生工作量统计列表")
    @PostMapping("/listAll")
    public R<List<Registration>> list(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectAll(registrationVo);
    }
    @ApiOperation(value = "医生工作总数统计", notes = "根据传入的 RegistrationVo 对象获取医生工作总数统计列表")
    @PostMapping("/listById")
    public R<List<Registration>> listR(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectById(registrationVo);
    }
    @ApiOperation(value = "挂号费用总收入统计", notes = "根据传入的 RegistrationVo 对象获取医生工作挂号费用总收入")
    @PostMapping("/listZSR")
    public R<List<Registration>> listA(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectZSR(registrationVo);
    }
    @ApiOperation(value = "挂号费用总退费统计", notes = "根据传入的 RegistrationVo 对象获取医生工作挂号费用总推退费")
    @PostMapping("/listZTF")
    public R<List<Registration>> listB(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectZTF(registrationVo);
    }
    @ApiOperation(value = "挂号费用总收入详情统计", notes = "根据传入的 RegistrationVo 对象获取医生工作挂号费用总收入详情")
    @PostMapping("/listWXSR")
    public R<List<Registration>> listC(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectWXSR(registrationVo);
    }
    @ApiOperation(value = "挂号费用总退费详情统计", notes = "根据传入的 RegistrationVo 对象获取医生工作挂号费用总退费详情统计")
    @PostMapping("/listWXTF")
    public R<List<Registration>> listD(@RequestBody RegistrationVo registrationVo) {
        return registrationService.selectWXTF(registrationVo);
    }
}
